package siyuan.run.gateway.fault.tolerance.routing.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Mono;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

/**
 * @program: sy
 * @description:
 * @author: SY
 * @create: 2020-12-09 15:26
 **/
@RestController
public class FallbackController {

    @GetMapping(value = "/fallback")
    public Mono<Map<String, String>> fallback() {
        Map<String, String> stringMap = new HashMap<>();
        stringMap.put("code", "100");
        stringMap.put("data", "Service Not Available");
        return Mono.just(stringMap);
    }

}
